#include <iostream>
#include <queue>
#include <map>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <set>
#include <unordered_set>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
int main()
{
	string s;
	while(getline(cin,s))
	{
		if(s[0]>'Z') s[0]-=32;
		for(int i=1;i<s.size();i++)
		{
			if(s[i]==' ')
			{
				if(s[i+1]>'Z') s[i+1]-=32;
			}
		}
		for(auto c:s)
		{
			cout<<c;
		}
		cout<<endl;
	}

	return 0;
}

